﻿using Furion.DynamicApiController;
using HOPU.OnlineSchool.Application.FileUploads.Dtos;
using HOPU.OnlineSchool.Application.FileUploads.Services;
using Microsoft.AspNetCore.Http;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace HOPU.OnlineSchool.Application.FileUploads
{
    public class FileAppService: IDynamicApiController
    {
        private readonly IFileService _fileService;

        public FileAppService(IFileService fileService) 
        {
            _fileService = fileService;
        }
        /// <summary>
        /// 图片上传
        /// </summary>
        /// <param name="file"></param>
        /// <param name="host"></param>
        /// <returns></returns>
        public OssUploadOutput Upload(IFormFile file , string host) 
        {
            return _fileService.Upload(file,host);
        }
    }
}
